<?php
#
# author: Phil Spagnolo
# (c)2008 South Hill Calvary Chapel
#

include_once("./root.inc.php");
include_once("${root}/mysql/database_info.php");
include_once("${root}/common.php");
include_once("${root}/mysql/common.php");

$table = "events";
connect_select_test($table);
$meta_key = 'calendar, events, regular, fun, action, advent, adventure, affair, appearance, business, celebration, ceremony, chance, circumstance, deed, development, experience, exploit, function, holiday, occasion, occurrence, proceeding';
$meta_desc='Current and Regular events that occur at South Hill Calvary Chapel.';
print_html_head('Upcoming and Regular Events',$meta_key,$meta_desc);

print_java_head(NULL);

begin_body();
page_title("Upcoming Events");

$linkList = array("church_calendar.php"); 
$textList = array("Calendar of All Events"); 


printf("<h3>Special Events </h3>\n");

$query="SELECT * FROM $table WHERE type='S' ORDER BY start ASC";
$result=mysql_query($query) or die (mysql_error());
$num_rows=mysql_num_rows($result);
events_table($result,$num_rows);

printf("<h3>Regular Events </h3>\n");

$query="SELECT * FROM $table WHERE type='R' ORDER BY start ASC";
$result=mysql_query($query) or die (mysql_error());
$num_rows=mysql_num_rows($result);
events_table($result,$num_rows);

in_page_link(1, false, $linkList, $textList, NULL);


//Close the database
mysql_close();

end_page_title();
end_body();
?>
